/* 重置样式 */

/* 页面重置 */
page {
  box-sizing: border-box;
  // min-height: 100vh;
  font-family: $font-family-base;
  font-size: $font-size-md;
  line-height: 1.5;  
  color: $color-text-primary;
  background-color: $color-bg-page;
}

/* 基础组件重置 */
view,
text,
scroll-view,
swiper,
swiper-item,
cover-view,
cover-image,
icon,
rich-text,
progress,
button,
checkbox,
form,
input,
label,
radio,
slider,
switch,
textarea,
navigator,
audio,
camera,
image,
video {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border: 0;
}

/* 表单组件重置 */
button {
  padding: 0;
  margin: 0;
  font-size: inherit;
  line-height: 1.5;
  background-color: transparent;

  &::after {
    border: none;
  }

  &[disabled] {
    color: $color-text-disabled;
    background-color: $color-bg-disabled;
  }
}

input,
textarea {
  width: 100%;
  font-size: inherit;
  color: inherit;
  background-color: transparent;

  &::input-placeholder {
    color: $color-text-placeholder;
  }
}

radio,
checkbox {
  margin-right: 20rpx;
}

radio .wx-radio-input,
checkbox .wx-checkbox-input {
  margin-right: 10rpx;
  border-radius: 50%;
}

/* 图片组件重置 */
image {
  width: 100%;
  height: 100%;
  vertical-align: middle;
  will-change: transform;
}

/* 媒体组件重置 */
video,
audio {
  width: 100%;
}

/* 滚动组件重置 */
scroll-view {
  width: 100%;
}

/* swiper组件重置 */
swiper {
  width: 100%;
  height: 300rpx;
}

swiper-item {
  flex: 1;
  width: 100%;
  height: 100%;
}

/* 导航组件重置 */
navigator {
  color: inherit;
  cursor: pointer;
  background: none;
}

/* 遮罩组件重置 */
cover-view,
cover-image {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5000;
}

/* 进度条组件重置 */
progress {
  width: 100%;
  background-color: $color-bg-disabled;
}

/* 滑块组件重置 */
slider {
  width: 100%;
  margin: 20rpx 0;
}

/* 开关组件重置 */
switch {
  transform: scale(0.9);
}

/* 富文本组件重置 */
rich-text {
  width: 100%;
  overflow: hidden;
}

/* 去除滚动条 */
::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  color: transparent;
  background: transparent;
}

/* 去除点击高亮 */
view,
text,
navigator,
input,
button {
  -webkit-tap-highlight-color: rgb(0 0 0 / 0%);
}

/* 去除长按菜单 */
view,
text,
navigator,
button,
image {
  -webkit-touch-callout: none;
  user-select: none;
}
